(function(){  
	var lib = {
		element: '',
		getById: function(id) {
			this.element = document.getElementById(id);
			return this;
		},
		on: function(action, callback) {
			this.element.addEventListener(action,callback,false);
			return this;
		},
		appendText: function(text) {
			text = document.createTextNode(text);
			this.element.appendChild(text);
			return this;
		},
		writeText: function(text) {
			this.element.innerHTML = text;
			return this;
		},
		css: function(obj) {
			for(var i in obj){ 
				this.element.style[i] = obj[i];
			}
			return this;
		}
	}
	if(!window.$) {
		window.$=lib;
	}
})();